<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
home
</body>
</html>
<script>
    // 定义一个函数用于获取指定名称的 Cookie 值
    function getCookie(name) {
        const cookies = document.cookie.split('; ');
        for (let i = 0; i < cookies.length; i++) {
            const parts = cookies[i].split('=');
            if (parts[0] === name) {
                return decodeURIComponent(parts[1]);
            }
        }
        return null;
    }

    // 在页面加载完成后执行代码
    window.addEventListener('load', () => {
        // 获取 token-params 的 Cookie 值
        const tokenParams = getCookie('token-params');
        if (tokenParams) {
            console.log('解析后的 token-params:', tokenParams);
        } else {
            console.log('未找到 token-params Cookie');
        }
    });
</script>